<template>
  <div>
  <div>
   <p>工号:{{workNum}}</p>
  </div>
  <div style="align-align: center;">
  <el-table
        stripe
        border
        :data="tableData"
        @row-click="dialogTableVisible = true"
        style="width: 100%;">
        <el-table-column
          prop="ID"
          label="ID"
          width="180">
        </el-table-column>
        <el-table-column
          prop="orderNum"
          label="订货号"
          width="180">
        </el-table-column>
        <el-table-column
          prop="orders"
          label="订货数量"
          width="180">
        </el-table-column>
        <el-table-column
          prop="ordermoney"
          label="订货金额"
          width="180">
        </el-table-column>
        <el-table-column
          prop="orderDate"
          label="订货日期"
          width="200">
        </el-table-column>
        <el-table-column
          prop="notes"
          label="备考">
        </el-table-column>
      </el-table>
  </div>
  <el-dialog title="订单号:OR0001" :visible.sync="dialogTableVisible" style="text-align: left;" >
    <el-table :data="tableData">
      <el-table-column property="ID" label="ID" width="150"></el-table-column>
      <el-table-column property="orderNum" label="订单号" width="200"></el-table-column>
      <el-table-column property="orders" label="订单数量"></el-table-column>
      <el-table-column property="ordermoney" label="订单金额"></el-table-column>
      <el-table-column property="orderDate" label="订单日期"></el-table-column>
      <el-table-column property="notes" label="备考"></el-table-column>
    </el-table>
  </el-dialog>

  </div>
</template>

<script>
export default {
  props: ['workn'],
  name: 'tag2',
  data () {
    return {
      tableData: [{
      ID: '1',
      orderNum: 'OR0001',
      orders: '30',
      ordermoney: '100',
      orderDate: '2020/3/18',
      notes: ''
      }, {
      ID: '2',
      orderNum: 'OR0002',
      orders: '100',
      ordermoney: '1200',
      orderDate: '2020/3/18',
      notes: ''
      }, {
      ID: '3',
      orderNum: 'OR0003',
      orders: '1130',
      ordermoney: '300',
      orderDate: '2020/3/19',
      notes: '紧急'
      }, {
      ID: '4',
      orderNum: 'OR0004',
      orders: '50',
      ordermoney: '1600',
      orderDate: '2020/3/18',
      notes: '特紧急'
      }, {
      ID: '5',
      orderNum: 'OR0005',
      orders: '90',
      ordermoney: '5100',
      orderDate: '2020/3/18',
      notes: ''
      }],
      dialogTableVisible: false,
      addLoading: false
    }
  },
  computed: {
    workNum() {
      return this.$store.state.count;
    }
  },
  methods: {
  }
}
</script>

<style scoped="">
  h1, h2 {
    font-weight: normal;
  }
  .table-head{
    background-color: #909399;
  }
</style>
